perm filename ALCOM.XGP[HAL,HE] blob sn#187086 filedate 1975-11-18 generic text, type T, neo UTF8
/FONT#0=BASL30[HAL, HE]/FONT#1=BASI30[HAL, HE]/FONT#2=BASB30/FONT#3=FIX20/FONT#4=GRK30/TMAR=200/PMAR=1992/BMAR=2
␈↓␈↓↓␈↓α␈↓β␈↓∧␈↓ ↓H
␈↓ α,␈β↓H␈↓␈↓␈↓ α,
␈↓ α,␈β↓k␈↓␈↓α␈↓&OVERVIEW OF THE AL COMPILER␈↓)βλ␈↓␈↓ α,
␈↓ α,␈βα∞␈↓␈↓ α,
␈↓ α,␈βα1␈↓␈↓&Introduction␈↓)βλ␈↓ α,
␈↓ α,␈βαT␈↓␈↓ α,
␈↓ α,␈βαw␈↓␈↓ α,The␈α∂AL␈α∂compiler␈α∂is␈α∂responsible␈α∞for␈α∞translating␈α∞a␈α∞user's␈α∞AL␈α∞program␈α∞into␈α∞interpreter␈α∞code␈↓ α,
␈↓ α,␈ββ~␈↓␈↓ α,that␈α∞can␈α∞be␈α
executed␈α
by␈α
the␈α
runtime␈α
system.␈α
This␈α
document␈α
gives␈α
brief␈α
descriptions␈α
of␈α
the␈↓ α,
␈↓ α,␈ββ=␈↓␈↓ α,major␈α∪components␈α∪of␈α∪the␈α∪compiler␈α∩and␈α∩traces␈α∩the␈α∩perils␈α∩and␈α∩progress␈α∩of␈α∩a␈α∩simple␈α∩AL␈↓ α,
␈↓ α,␈ββ`␈↓␈↓ α,program␈α
as␈α
it␈α
goes␈α
through␈α
the␈α
various␈α
stages␈α
of␈α
compilation.␈↓ α,
␈↓ α,␈β∧β␈↓␈↓ α,
␈↓ α,␈β∧&␈↓␈↓ α,The␈α∞compiler␈α∞is␈α∞currently␈α∞being␈α∞implemented␈α∞in␈α
SAIL␈α
for␈α
a␈α
PDP-10.␈α
The␈α
implementation␈↓ α,
␈↓ α,␈β∧I␈↓␈↓ α,structure␈α⊃is␈α⊃still␈α⊃essentially␈α⊃the␈α⊃same␈α⊃as␈α⊃that␈α⊃described␈α⊃in␈α⊃AIM-243,␈α⊃␈↓↓AL,␈α⊃a␈α⊂Programming␈↓ α,
␈↓ α,␈β∧l␈↓↓␈↓ α,System␈α∀for␈α∀Automation␈↓,␈α∀although␈α∀some␈α∀minor␈α∪changes␈α∪have␈α∪been␈α∪made.␈α∪Translation␈α∪is␈↓ α,
␈↓ α,␈β¬∂␈↓␈↓ α,accomplished␈α
in␈α
three␈α
phases:␈↓ α,
␈↓ α,␈β¬2␈↓␈↓ α,
␈↓ α|␈β¬U␈↓␈↓ α|1.␈↓&Parsing␈↓)βλ.␈α∂The␈α∂source␈α∞text␈α∞is␈α∞read␈α∞in␈α∞and␈α∞translated␈α∞into␈α∞an␈α∞internal␈α∞structure␈↓ α|
␈↓ α|␈β¬x␈↓␈↓ α|("program␈α
graph")␈α
understandable␈α
by␈α
the␈α
rest␈α
of␈α
the␈α
compiler.␈↓ α|
␈↓ α|␈βε≠␈↓␈↓ α|
␈↓ α|␈βε>␈↓␈↓ α|2.␈α␈↓&Preprocessing␈↓)βλ.␈αThe␈αAL␈αprogram␈αis␈αsimulated␈αto␈αbuild␈αup␈αa␈αdetailed␈αplanning␈↓ α|
␈↓ α|␈βεa␈↓␈↓ α|model␈α_of␈α↔the␈α↔expected␈α↔state␈α↔at␈α↔each␈α↔point␈α↔in␈α↔the␈α↔program␈α↔graph.␈α↔The␈↓ α|
␈↓ α|␈βπ∧␈↓␈↓ α|information␈αin␈αthis␈αmodel␈αwill␈αbe␈αused␈αby␈αthe␈αcode␈αemission/trajectory␈αplanning␈↓ α|
␈↓ α|␈βπ'␈↓␈↓ α|phase␈αand␈αincludes␈αinformation␈αabout␈αthe␈αaffixment␈αstructure␈αand␈αthe␈αexpected␈↓ α|
␈↓ α|␈βπJ␈↓␈↓ α|value␈αof␈αlocation␈αvariables.␈αIn␈αaddition,␈αa␈αnumber␈αof␈αimportant␈αdetails␈αare␈αfilled␈↓ α|
␈↓ α|␈βπm␈↓␈↓ α|into␈α∃the␈α∃program␈α∃graph,␈α∃which␈α∃may␈α∀be␈α∀rewritten␈α∀somewhat.␈α∀For␈α∀instance,␈↓ α|
␈↓ α|␈βλ⊂␈↓␈↓ α|affixment␈α→statements␈α→are␈α→translated␈α→into␈α→sequences␈α_of␈α_lower-level␈α_"graph␈↓ α|
␈↓ α|␈βλ3␈↓␈↓ α|assignment"␈α⊃statements.␈α⊃Similarly,␈α⊃the␈α⊃modeled␈α⊃affixment␈α⊃structure␈α⊃is␈α⊃used␈α⊂to␈↓ α|
␈↓ α|␈βλV␈↓␈↓ α|turn␈αstatements␈αlike␈α"MOVE␈αa␈αTO␈αb"␈αinto␈αmore␈αexplicit␈αstatements␈αinvolving␈αa␈↓ α|
␈↓ α|␈βλy␈↓␈↓ α|specific␈α
arm,␈α
like␈α
"MOVE␈α
BARM␈α
TO␈α
b*t".␈↓ α|
␈↓ α|␈β	≤␈↓␈↓ α|
␈↓ α|␈β	?␈↓␈↓ α|3.␈α∪␈↓&Code␈α∪emission␈↓)βλ.␈α∩Joint␈α∩trajectories␈α∩are␈α∩computed␈α∩for␈α∩all␈α∩motion␈α∩statements,␈↓ α|
␈↓ α|␈β	b␈↓␈↓ α|based␈α∞on␈α∞the␈α∞expected␈α∞location␈α
values␈α
contained␈α
in␈α
the␈α
planning␈α
model.␈α
These␈↓ α|
␈↓ α|␈β
¬␈↓␈↓ α|trajectories␈α∞are␈α∞written␈α
into␈α
output␈α
files.␈α
Similarly,␈α
interpreter␈α
code␈α
is␈α
produced␈↓ α|
␈↓ α|␈β
(␈↓␈↓ α|from␈α
the␈α
refined␈α
program␈α
graph␈α
and␈α
written␈α
into␈α
an␈α
output␈α
file.␈↓ α|
␈↓ α,␈β
K␈↓␈↓ α,␈↓ α,
␈↓ α,␈β
n␈↓␈↓ α,Subsequent␈αsections␈αwill␈αdescribe␈αthese␈αphases␈αin␈αmore␈αdetail.␈αThe␈αprincipal␈αdifferences␈αwith␈↓ α,
␈↓ α,␈β⊃␈↓␈↓ α,AIM-243␈αare␈αthe␈αinput␈αsyntax,␈αfor␈αwhich␈αa␈αmuch␈αsimpler␈αform␈αis␈αcurrently␈αbeing␈αused,␈αand␈↓ α,
␈↓ α,␈β4␈↓␈↓ α,the␈αcompiler␈αoutput␈αformat,␈αwhich␈αis␈αnow␈αa␈α
text␈α
file␈α
for␈α
input␈α
to␈α
a␈α
PDP-11␈α
assembler,␈α
rather␈↓ α,
␈↓ α,␈βW␈↓␈↓ α,than␈α
a␈α
binary␈α
load␈α
module.␈↓ α,
␈↓ α,␈βz␈↓␈↓ α,
␈↓ F␈β∂l␈↓α[1]
␈↓ D␈β↓␈↓α[2]
␈↓ α,␈β↓H␈↓␈↓&Parser␈↓)βλ␈↓ α,
␈↓ α,␈β↓k␈↓␈↓ α,
␈↓ α,␈βα∞␈↓␈↓ α,The␈α
parser␈α
is␈α
responsible␈α
for␈α
translating␈α
the␈αuser's␈αsource␈αprogram␈αinto␈αa␈αform␈αthat␈αcan␈αbe␈↓ α,
␈↓ α,␈βα1␈↓␈↓ α,manipulated␈α∂conveniently␈α∂by␈α∂the␈α∞rest␈α∞of␈α∞the␈α∞compiler.␈α∞Although␈α∞the␈α∞AL␈α∞syntax␈α∞does␈α∞offer␈↓ α,
␈↓ α,␈βαT␈↓␈↓ α,some␈α∞moderately␈α∞interesting␈α∞problems␈α∞(for␈α∞instance,␈α∞physical␈α∞units␈α
checking␈α
and␈α
expression␈↓ α,
␈↓ α,␈βαw␈↓␈↓ α,variables),␈αimplementation␈αof␈αa␈αparser␈αfor␈αthe␈αsyntax␈αgiven␈αin␈αAIM-243␈αwas␈αposponed␈αuntil␈↓ α,
␈↓ α,␈ββ~␈↓␈↓ α,such␈αtime␈αas␈αa␈αvolunteer␈αcould␈αbe␈αfound␈αto␈αdo␈αthe␈αwork.␈α(Actually,␈αa␈αtable-driven␈αparser␈αfor␈↓ α,
␈↓ α,␈ββ=␈↓␈↓ α,AL␈α
was␈α
written␈α
some␈α
time␈αago.␈αThe␈αproductions␈αwere␈αnever␈αcompletely␈αdebugged,␈αhowever,␈↓ α,
␈↓ α,␈ββ`␈↓␈↓ α,and␈α
the␈α
program␈α
was␈α
abandoned␈α
for␈α
want␈α
of␈α
a␈α
person␈α
to␈α
work␈α
on␈α
it).␈↓ α,
␈↓ α,␈β∧β␈↓␈↓ α,
␈↓ α,␈β∧&␈↓␈↓ α,Instead,␈αa␈αmuch␈αsimpler␈αinput␈αsyntax␈αhas␈αbeen␈αsubstituted␈αas␈αan␈αinterim␈αmeasure.␈αThe␈αbasic␈↓ α,
␈↓ α,␈β∧I␈↓␈↓ α,elements␈α
in␈α
this␈α
syntax␈α
are␈α
atomic␈α
symbols␈α
and␈α
forms␈α
like:␈↓ α,
␈↓ α|␈β∧l␈↓␈↓ α|
␈↓ α|␈β¬∂␈↓(<keyword> <e1> <e2> ... <ek> )␈↓ α|
␈↓ α,␈β¬2␈↓␈↓ α,
␈↓ α,␈β¬U␈↓␈↓ α,which␈αcorrespond␈α
in␈α
a␈α
more␈α
or␈α
less␈α
one-to-one␈α
manner␈α
with␈α
the␈α
record␈α
structures␈α
used␈α
inside␈↓ α,
␈↓ α,␈β¬x␈↓␈↓ α,the␈α
compiler.␈α
For␈α
instance,␈α
the␈α
program␈↓ α,
␈↓ α|␈βε≠␈↓␈↓ α|
␈↓ α|␈βε>␈↓BEGIN␈↓ α|
␈↓ α|␈βεa␈↓    FRAME a,b;ROTN r;TRANS t;␈↓ α|
␈↓ α|␈βπ∧␈↓    r←ROT(YHAT,180*DEG);␈↓ α|
␈↓ α|␈βπ'␈↓    a ← FRAME(r,VECTOR(0,0,2));␈↓ α|
␈↓ α|␈βπJ␈↓    MOVE YELLOW TO FRAME(r,VECTOR(1,0,2));␈↓ α|
␈↓ α|␈βπm␈↓    b ← FRAME(r,VECTOR(0,0,3));␈↓ α|
␈↓ α|␈βλ⊂␈↓    AFFIX a TO YELLOW BY t RIGIDLY;␈↓ α|
␈↓ α|␈βλ3␈↓    MOVE a TO b;␈↓ α|
␈↓ α|␈βλV␈↓    MOVE a TO b*TRANS(ROT(XHAT,90*DEG),VECTOR(1,1,1));␈↓ α|
␈↓ α|␈βλy␈↓    UNFIX a FROM YELLOW;␈↓ α|
␈↓ α|␈β	≤␈↓    MOVE YELLOW TO YPARK;␈↓ α|
␈↓ α|␈β	?␈↓END;␈↓ α|
␈↓ α,␈β	b␈↓␈↓ α,
␈↓ α,␈β
¬␈↓would be written as ␈↓ α,
␈↓ α|␈β
(␈↓␈↓ α|
␈↓ α|␈β
K␈↓(PR␈↓ α|
␈↓ α|␈β
n␈↓  (BL (FVAR a b)(RVAR r)(TVAR t)␈↓ α|
␈↓ α|␈β⊃␈↓    (AS r (RMAKE YHAT (SSMUL 180 DEG)))␈↓ α|
␈↓ α|␈β4␈↓    (AS a (FMAKE r (VMAKE 0 0 2)))␈↓ α|
␈↓ α|␈βW␈↓    (MO YARM (FMAKE r (VMAKE 1 0 2)))␈↓ α|
␈↓ α|␈βz␈↓    (AS b (FMAKE r (VMAKE 0 0 3)))␈↓ α|
␈↓ α|␈β≥␈↓    (AFFIX a YARM t () RIGIDLY)␈↓ α|
␈↓ α|␈β@␈↓    (MO a b)␈↓ α|
␈↓ α|␈βc␈↓    (MO a (TTMUL b (TMAKE (AXW_ROTN XHAT (SSMUL 90 DEG))(VMAKE 1 1 1))))␈↓ α|
␈↓ α|␈β
ε␈↓    (UNFIX a YARM)␈↓ α|
␈↓ α|␈β
)␈↓    (MO YARM YPARK)␈↓ α|
␈↓ α|␈β
L␈↓  )␈↓ α|
␈↓ α|␈β
o␈↓ )␈↓ α|
␈↓ α,␈β∞∩␈↓␈↓ α,
␈↓ α,␈β∞5␈↓␈↓ α,A␈α
simple␈α
parser␈α
for␈α
the␈α
simplified␈α
syntax␈α
has␈α
been␈α
implemented␈α
and␈α
incorporated␈αinto␈αthe␈↓ α,
␈↓ α,␈β∞X␈↓␈↓ α,present␈αcompiler␈αimplementation,␈αand␈αan␈αinterim␈αprogramming␈αmanual␈αhas␈αbeen␈αwritten␈αfor␈↓ α,
␈↓ α,␈β∞{␈↓␈↓ α,persons␈α
wishing␈α
to␈α
use␈αAL␈αin␈αits␈αpresent␈αform.␈α(The␈αmanual␈αis␈αreprinted␈αin␈αanother␈αsection␈↓ α,
␈↓ α,␈β∂≡␈↓␈↓ α,of␈α
this␈α
report).␈↓ α,
␈↓ D␈β↓␈↓α[3]
␈↓ α,␈β↓H␈↓␈↓ α,
␈↓ α,␈β↓k␈↓␈↓ α,Generally␈α∞speaking,␈α∞the␈α∞semantics␈α∞of␈α
the␈α
various␈α
language␈α
constructs␈α
have␈α
remained␈α
pretty␈↓ α,
␈↓ α,␈βα∞␈↓␈↓ α,much␈α∞the␈α
same␈α
as␈α
given␈α
in␈α
AIM-243.␈α
Only␈α
the␈α
names␈α
have␈α
been␈α
changed.␈α
This␈α
approach␈↓ α,
␈↓ α,␈βα1␈↓␈↓ α,has␈α⊂permitted␈α⊂effort␈α⊂to␈α⊂be␈α⊂concentrated␈α⊂on␈α⊂the␈α⊂more␈α⊂important␈α⊂problems␈α∂of␈α∂producing␈α∂a␈↓ α,
␈↓ α,␈βαT␈↓␈↓ α,working␈α⊂runtime␈α⊂system␈α⊂and␈α∂building␈α∂programs␈α∂to␈α∂transform␈α∂AL␈α∂program␈α∂structures␈α∂into␈↓ α,
␈↓ α,␈βαw␈↓␈↓ α,code␈α
that␈α
can␈α
be␈α
interpreted␈α
by␈α
the␈α
runtime␈α
system.␈↓ α,
␈↓ α,␈ββ~␈↓␈↓ α,
␈↓ α,␈ββ=␈↓␈↓ α,Recently,␈αMr.␈αW.␈αT.␈αLaaser␈α(a␈αCS␈αgraduate␈αstudent␈α
at␈α
Stanford)␈α
has␈α
begun␈α
work␈α
on␈α
a␈α
parser␈↓ α,
␈↓ α,␈ββ`␈↓␈↓ α,for␈αthe␈αAIM-243␈αsyntax.␈αThe␈αtenetive␈αapproach␈αtaken␈αfor␈αthis␈αis␈αto␈α
translate␈α
source␈α
text␈α
into␈↓ α,
␈↓ α,␈β∧β␈↓␈↓ α,the␈αcorresponding␈αAL␈αinternal␈αstructures␈αand␈αthen␈αto␈αtranslate␈αthe␈αinternal␈αstructures␈αinto␈αa␈↓ α,
␈↓ α,␈β∧&␈↓␈↓ α,text␈α
file␈α
that␈α
can␈α
be␈α
read␈αin␈αby␈αthe␈αpresent␈αparser.␈αOne␈αof␈αthe␈αprincipal␈αadvantages␈αof␈αthis␈↓ α,
␈↓ α,␈β∧I␈↓␈↓ α,approach␈α
is␈α
that␈α
it␈α
insulates␈α
the␈α
parser␈α
project␈α
from␈α
work␈αon␈αthe␈αrest␈αof␈αthe␈αcompiler,␈αthus␈↓ α,
␈↓ α,␈β∧l␈↓␈↓ α,keeping␈α⊃bugs␈α⊃occuring␈α⊃in␈α⊃one␈α⊂part␈α⊂from␈α⊂holding␈α⊂up␈α⊂work␈α⊂in␈α⊂the␈α⊂other.␈α⊂The␈α⊂danger,␈α⊂of␈↓ α,
␈↓ α,␈β¬∂␈↓␈↓ α,course,␈α
is␈α
that␈α
the␈α
structures␈αbuilt␈αby␈αthe␈αparser␈αmay␈αbe␈αsubtly␈αdifferent␈αfrom␈αthose␈αused␈αin␈↓ α,
␈↓ α,␈β¬2␈↓␈↓ α,the␈α
compiler,␈α
thus␈αmaking␈αit␈αvery␈αdifficult␈αto␈αdo␈αaway␈αeventually␈αwith␈αthe␈αintermediate␈αfile.␈↓ α,
␈↓ α,␈β¬U␈↓␈↓ α,We␈αare␈αaware␈αof␈αthis,␈αand␈αare␈αtaking␈αcare␈αto␈αminimize␈αany␈αsuch␈αdifficulties.␈αIn␈αany␈αevent,␈αit␈↓ α,
␈↓ α,␈β¬x␈↓␈↓ α,is␈αfelt␈αthat␈αthe␈αpossible␈αcosts␈αof␈αlater␈αmerging␈αare␈αmore␈αthan␈αcompensated␈αby␈αthe␈αbenefits␈αof␈↓ α,
␈↓ α,␈βε≠␈↓␈↓ α,increased␈α
insulation␈α
during␈α
program␈α
development.␈↓ α,
␈↓ α,␈βε>␈↓␈↓ α,
␈↓ α,␈βεa␈↓␈↓&Internal Representation of AL Programs␈↓)βλ␈↓ α,
␈↓ α,␈βπ∧␈↓␈↓ α,
␈↓ α,␈βπ'␈↓␈↓ α,Internally,␈αAL␈αprogram␈αgraphs␈αare␈αbuilt␈αas␈αSAIL␈αrecord␈αstructures.␈αEssentially,␈αthe␈αcompiler␈↓ α,
␈↓ α,␈βπJ␈↓␈↓ α,associates␈α
a␈α
record␈α
"class"␈α
with␈α
each␈α
major␈α
semantic␈α
entity␈α
in␈α
AL.␈α
For␈α
example:␈↓ α,
␈↓ α,␈βπt␈↓␈↓β␈↓ α,
␈↓ α,␈βλ↔␈↓β␈↓ βRECORD_CLASS V3ECT(REAL X,Y,Z);␈↓ α,
␈↓ α,␈βλ:␈↓β␈↓ βRECORD_CLASS ASSIGNMENT(POINTER(VARIABLE) VAR;POINTER(EXPRESSION) VAL);␈↓ α,
␈↓ α,␈βλV␈↓β␈↓␈↓ α,
␈↓ α,␈βλy␈↓␈↓ α,are␈αused␈αfor␈αvector␈αconstants␈αand␈αassignment␈α
statements,␈α
respectively.␈α
Component␈α
elements␈α
of␈↓ α,
␈↓ α,␈β	≤␈↓␈↓ α,the␈α
records␈α
can␈α
then␈α
be␈α
accessed␈α
by␈α
name,␈α
as␈α
with:␈↓ α,
␈↓ α,␈β	F␈↓␈↓β␈↓ α,
␈↓ α,␈β	i␈↓β␈↓ βQ←V3ECT:X[V1]*V3ECT:X[V2];␈↓ α,
␈↓ α,␈β
¬␈↓β␈↓␈↓ α,
␈↓ α,␈β
(␈↓␈↓ α,A␈α⊃large␈α⊃number␈α⊃of␈α⊃"service"␈α⊃routines␈α⊃have␈α⊃been␈α⊃provided␈α⊃to␈α⊃aid␈α⊃in␈α⊃manipulating␈α⊂these␈↓ α,
␈↓ α,␈β
K␈↓␈↓ α,structures.␈α
For␈α
instance,␈↓ α,
␈↓ α,␈β
u␈↓␈↓β␈↓ α,
␈↓ α,␈β_␈↓β␈↓ βHALPRN(<structure>) -- produces "pretty printed" output of <structure>␈↓ α,
␈↓ α,␈β;␈↓β␈↓ βV3DOT(V1,V2) -- computes the vector dot product of V1 and V2␈↓ α,
␈↓ α,␈βW␈↓β␈↓␈↓ α,
␈↓ α,␈βz␈↓␈↓ α,This␈αapproach␈α
has␈α
allowed␈α
considerable␈α
flexibility␈α
in␈α
implementation,␈α
since␈α
SAIL␈α
handles␈α
all␈↓ α,
␈↓ α,␈β≥␈↓␈↓ α,free-storage␈α⊂management␈α⊂and␈α⊂since␈α⊂new␈α⊂attributes␈α⊂can␈α⊂be␈α⊂added␈α⊂to␈α∂the␈α∂various␈α∂semantic␈↓ α,
␈↓ α,␈β@␈↓␈↓ α,entities␈α
without␈α
recoding␈α
previously␈α
debugged␈α
programs.␈↓ α,
␈↓ α,␈βc␈↓␈↓ α,
␈↓ α,␈β
ε␈↓␈↓ α,Currently,␈αthere␈α
are␈α
in␈α
excess␈α
of␈α
50␈α
such␈α
class␈α
declarations,␈α
new␈α
ones␈α
being␈α
added␈α
at␈α
a␈α
rate␈α
of␈↓ α,
␈↓ α,␈β
)␈↓␈↓ α,(very)␈α
roughly␈α
two␈α
a␈α
week.␈↓ α,
␈↓ α,␈β
L␈↓␈↓ α,
␈↓ α,␈β
o␈↓␈↓ α,The␈α⊃principal␈α⊃structural␈α⊃entities␈α⊃used␈α⊃in␈α⊃representing␈α⊂an␈α⊂AL␈α⊂program␈α⊂are␈α⊂BLOCK␈α⊂and␈↓ α,
␈↓ α,␈β∞∩␈↓␈↓ α,STMNT␈α
records.␈α
Simpilfied,␈α
their␈α
declarations␈α
look␈α
like␈α
this:␈↓ α,
␈↓ α,␈β∞<␈↓␈↓β␈↓ α,
␈↓ α,␈β∞←␈↓β␈↓ βRECORD_CLASS BLOCK(LIST CODE,VARS);␈↓ α,
␈↓ α,␈β∂α␈↓β␈↓ βRECORD_CLASS STMNT(ITEM IW,OW;POINTER(ANY_CLASS) SEMANTICS);␈↓ α,
␈↓ α,␈β∂≡␈↓β␈↓␈↓ α,
␈↓ A␈β↓␈↓α[4]
␈↓ α,␈β↓H␈↓␈↓ α,In␈α
a␈α
BLOCK,␈α
VARS␈α
is␈α
a␈α
list␈α
of␈α
variables␈α
declared␈α
within␈αthat␈αblock,␈αand␈αcode␈αis␈αa␈αlist␈αof␈↓ α,
␈↓ α,␈β↓k␈↓␈↓ α,STMNT␈αrecords␈αfor␈αthe␈αexecutable␈αstatements␈αin␈αthe␈αblock.␈αIn␈αa␈αstatement,␈αIW␈α
and␈α
OW␈α
are␈↓ α,
␈↓ α,␈βα∞␈↓␈↓ α,context␈α⊂pointers␈α⊂into␈α⊂the␈α⊂simulation␈α⊂model's␈α⊂data␈α⊂base,␈α⊂corresponding,␈α∂respectively,␈α∂to␈α∂the␈↓ α,
␈↓ α,␈βα1␈↓␈↓ α,expected␈α∂state␈α∂before␈α∞and␈α∞after␈α∞the␈α∞statement␈α∞is␈α∞executed.␈α∞Figure␈α∞1␈α∞illustrates␈α∞the␈α∞program␈↓ α,
␈↓ α,␈βαT␈↓␈↓ α,graph␈α
built␈α
for␈α
our␈α
sample␈α
program.␈↓ α,
␈↓ C␈β↓␈↓α[5]
␈↓ α,␈β↓H␈↓␈↓&Preprocessor␈↓)βλ␈↓ α,
␈↓ α,␈β↓k␈↓␈↓ α,
␈↓ α,␈βα∞␈↓␈↓ α,The␈α∂principal␈α∂duty␈α∂of␈α∂the␈α∂preprocessor␈α∂is␈α∂to␈α∂produce␈α∞a␈α∞"planning␈α∞model"␈α∞of␈α∞the␈α∞expected␈↓ α,
␈↓ α,␈βα1␈↓␈↓ α,program␈α⊃state␈α⊃at␈α⊃each␈α⊃point␈α⊃in␈α⊃the␈α⊃program␈α⊃graph.␈α⊃This␈α⊃model␈α⊃is␈α⊃then␈α⊃used␈α⊃to␈α⊂supply␈↓ α,
␈↓ α,␈βαT␈↓␈↓ α,planning␈αvalues␈αfor␈αuse␈αby␈αthe␈αtrajectory␈αcalculator,␈αto␈αdetermine␈αwhich␈αarm␈αis␈αto␈αbe␈αused␈α
in␈↓ α,
␈↓ α,␈βαw␈↓␈↓ α,motion␈α
statements,␈α
and␈α
other␈α
similar␈α
purposes.␈↓ α,
␈↓ α,␈ββ~␈↓␈↓ α,
␈↓ α,␈ββ=␈↓␈↓ α,The␈αplanning␈αmodel␈αis␈αkept␈αin␈αa␈α
data␈α
base␈α
of␈α
assertional␈α
forms,␈α
the␈α
most␈α
important␈α
of␈α
which␈↓ α,
␈↓ α,␈ββ`␈↓␈↓ α,(for␈α∪our␈α∪present␈α∪purposes)␈α∪are␈α∪those␈α∪dealing␈α∪with␈α∪expected␈α∪values␈α∪and␈α∩affixments,␈α∩for␈↓ α,
␈↓ α,␈β∧β␈↓␈↓ α,example:␈↓ α,
␈↓ α,␈β∧-␈↓␈↓β␈↓ α,
␈↓ α,␈β∧P␈↓β␈↓ β(VALUE_OF_YARM,FRAME(NILROT,VECTOR(0,31.2,23.7))␈↓ α,
␈↓ α,␈β∧s␈↓β␈↓ β(AFFIXED,f1,YARM,t,NONRIGIDLY)␈↓ α,
␈↓ α,␈β¬∂␈↓β␈↓␈↓ α,
␈↓ α,␈β¬2␈↓␈↓ α,With␈α∪each␈α∪such␈α∪assertion,␈α∪the␈α∩database␈α∩routines␈α∩keep␈α∩a␈α∩list␈α∩of␈α∩"worlds"␈α∩in␈α∩which␈α∩that␈↓ α,
␈↓ α,␈β¬U␈↓␈↓ α,assertion␈α⊃is␈α⊃assumed␈α⊃to␈α⊃be␈α⊃"true".␈α⊃Currently,␈α⊃the␈α⊂data␈α⊂base␈α⊂routines␈α⊂include␈α⊂facilities␈α⊂for␈↓ α,
␈↓ α,␈β¬x␈↓␈↓ α,addition,␈αdeletion,␈αand␈αassociative␈αretrieval␈αof␈αfacts␈αfrom␈αthe␈αdata␈α
base␈α
and␈α
for␈α
manipulating␈↓ α,
␈↓ α,␈βε≠␈↓␈↓ α,worlds␈α
as␈α
if␈α
they␈α
were␈α
sets␈α
of␈α
facts.␈α
The␈α
principal␈α
routines␈α
include:␈↓ α,
␈↓ α,␈βεE␈↓␈↓β␈↓ α,
␈↓ α,␈βεh␈↓β␈↓ βASRTPF(<world>,<form>) -- adds assertional form to <world>␈↓ α,
␈↓ α,␈βπ␈↓β␈↓ βDENYPF(<world>,<form>) -- removes assertional form from <world>␈↓ α,
␈↓ α,␈βπ.␈↓β␈↓ βPMATCH(<world>,<form>) -- retrieves all forms that match <form> in <world>␈↓ α,
␈↓ α,␈βπQ␈↓β␈↓ βCPYWLD(<world 1>,<world 2>) -- makes a fact true in <world 2> if and only if it is true in <world 1>␈↓ α,
␈↓ α,␈βπt␈↓β␈↓ βANDWLD(<world 1>,<world 2>,<world 3>) -- sets <world 2> to the intersection of <world 1> and <world 2>.␈↓ α,
␈↓ α,␈βλ↔␈↓β␈↓ βANDWLD(<world 1>,<world 2>,<world 3>) -- sets <world 2> to the union of <world 1> and <world 2>.␈↓ α,
␈↓ α,␈βλ3␈↓β␈↓␈↓ α,
␈↓ α,␈βλV␈↓␈↓ α,Other␈α∪routines␈α∪provide␈α∪a␈α∪"demon"␈α∪facility␈α∪that␈α∩allows␈α∩a␈α∩pattern␈α∩to␈α∩be␈α∩flagged␈α∩so␈α∩that␈↓ α,
␈↓ α,␈βλy␈↓␈↓ α,additional␈α
book-keeping␈α
procedures␈α
are␈α
called␈α
whenever␈α
that␈α
pattern␈α
is␈α
asserted␈α
or␈α
denied.␈↓ α,
␈↓ α,␈β	≤␈↓␈↓ α,
␈↓ α,␈β	?␈↓␈↓ α,Subroutines␈α
for␈α
simulating␈α
the␈α
effects␈α
of␈α
graph␈α
structure␈α
are␈αbuilt␈α"on␈αtop␈αof"␈αthe␈αdatabase␈↓ α,
␈↓ α,␈β	b␈↓␈↓ α,routines.␈α
These␈α
include:␈↓ α,
␈↓ α,␈β
␈↓␈↓β␈↓ α,
␈↓ α,␈β
/␈↓β␈↓ βGETVALUE(<variable>,<world>) -- returns planning value of <variable> in <world>␈↓ α,
␈↓ α,␈β
R␈↓β␈↓ βVCHANGE(<variable>,<value>,<world>) -- sets the planning value of <variable> to <value> in <world>␈↓ α,
␈↓ α,␈β
u␈↓β␈↓ βEVALEXPR(<expression>,<world>) -- computes planning value for <expression> in <world>.␈↓ α,
␈↓ α,␈β⊃␈↓β␈↓␈↓ α,
␈↓ α,␈β4␈↓␈↓ α,which␈αare␈αused␈αby␈αboth␈αthe␈αsimulator␈αand␈αthe␈αtrajectory␈αcalculator␈αto␈αfetch␈αplanning␈αvalues.␈↓ α,
␈↓ α,␈βW␈↓␈↓ α,Other␈α↔important␈α↔graph␈α↔structure␈α↔routines␈α↔in␈α↔EXPRS␈α↔include␈α↔ADDCLC,␈α⊗KILLCLC,␈↓ α,
␈↓ α,␈βz␈↓␈↓ α,ADDCHG,␈α
and␈α
KILLCHG,␈α
which␈α
are␈α
used␈α
in␈α
simulating␈α
graph␈α
structure␈α
modifications.␈↓ α,
␈↓ α,␈β≥␈↓␈↓ α,
␈↓ α,␈β@␈↓␈↓ α,The␈α
actual␈α
simulation␈α
proceeds␈α
in␈α
two␈α
phases:␈↓ α,
␈↓ α|␈βc␈↓␈↓ α|
␈↓ α|␈β
ε␈↓␈↓ α|1.␈↓&initialization␈↓)βλ␈α↔Procedure␈α↔WLDASG␈α↔is␈α⊗called␈α⊗to␈α⊗assign␈α⊗input␈α⊗and␈α⊗output␈↓ α|
␈↓ α|␈β
)␈↓␈↓ α|planning␈α∞worlds␈α∞to␈α∞every␈α∞statement␈α∞in␈α∞the␈α∞program␈α∞graph.␈α∞Usually,␈α
the␈α
output␈↓ α|
␈↓ α|␈β
L␈↓␈↓ α|world␈α
of␈αone␈αstatement␈αwill␈αbe␈αthe␈αinput␈αworld␈αof␈αthe␈αnext␈αstatement.␈αTo␈αavoid␈↓ α|
␈↓ α|␈β
o␈↓␈↓ α|needless␈α
proliferation␈α
of␈α
worlds,␈α
WLDASG␈αtreats␈αsequences␈αof␈αassignments␈αand␈↓ α|
␈↓ α|␈β∞∩␈↓␈↓ α|affixments␈α
as␈α
a␈α
single␈α
statement.␈α
In␈α
addition,␈α
initial␈α
planning␈αvalues␈αare␈αset␈αup␈↓ α|
␈↓ α|␈β∞5␈↓␈↓ α|for␈α∞certain␈α∞predeclared␈α∞variables␈α∞(such␈α∞as␈α∞YARM).␈α∞World␈α∞assignments␈α∞for␈α
our␈↓ α|
␈↓ α|␈β∞X␈↓␈↓ α|sample␈α
program␈α
are␈α
indicated␈α
below.␈↓ α|
␈↓ 
t␈β↓␈↓α[6]
␈↓ βL␈β↓H␈↓␈↓β␈↓ βL
␈↓ βL␈β↓k␈↓β(PR␈↓ βL
␈↓ βL␈βα∞␈↓β  (BL (FVAR a b)(RVAR r)(TVAR t)␈↓ βL
␈↓ βL␈βα1␈↓β    (AS r (RMAKE YHAT (SSMUL 180 DEG))) [IW = W0, OW = W1]␈↓ βL
␈↓ βL␈βαT␈↓β    (AS a (FMAKE r (VMAKE 0 0 2))) [IW = W1, OW = W1]␈↓ βL
␈↓ βL␈βαw␈↓β    (MO YARM (FMAKE r (VMAKE 1 0 2))) [IW = W1, OW = W2]␈↓ βL
␈↓ βL␈ββ~␈↓β    (AS b (FMAKE r (VMAKE 0 0 3))) [IW = W2, OW = W3]␈↓ βL
␈↓ βL␈ββ=␈↓β    (AFFIX a YARM t () RIGIDLY) [IW = W3, OW = W3]␈↓ βL
␈↓ βL␈ββ`␈↓β    (MO a b) [IW = W3, OW = W4]␈↓ βL
␈↓ βL␈β∧β␈↓β    (MO a (TTMUL b (TMAKE (AXW_ROTN XHAT (SSMUL 90 DEG))(VMAKE 1 1 1)))) [IW = W4, OW = W5]␈↓ βL
␈↓ βL␈β∧&␈↓β    (UNFIX a YARM) [IW = W5, OW = W6]␈↓ βL
␈↓ βL␈β∧I␈↓β    (MO YARM YPARK) [IW = W6, OW = W7]␈↓ βL
␈↓ βL␈β∧l␈↓β  )[IW = W0, OW = W7]␈↓ βL
␈↓ βL␈β¬∂␈↓β )␈↓ βL
␈↓ α|␈β¬+␈↓β␈↓␈↓ α|
␈↓ α|␈β¬N␈↓␈↓ α|2.␈↓&simulation␈↓)βλ␈α⊂Recursive␈α⊂procedure␈α⊂STINTERP␈α⊂is␈α⊂called␈α⊂to␈α⊂perform␈α⊂the␈α⊂actual␈↓ α|
␈↓ α|␈β¬q␈↓␈↓ α|smulation.␈αThis␈αprocedure␈αconsists␈αof␈αa␈αbig␈α
IF-THEN-ELSE␈α
chain␈α
that␈α
looks␈α
at␈↓ α|
␈↓ α|␈βε∀␈↓␈↓ α|the␈αsemantics␈αof␈αeach␈αstatement␈αand␈αperforms␈αthe␈αappropriate␈αactions␈αto␈αupdate␈↓ α|
␈↓ α|␈βε7␈↓␈↓ α|the␈α∂planning␈α∂model.␈α∂Typically,␈α∂this␈α∂involves␈α∂copying␈α∂the␈α∞input␈α∞world␈α∞into␈α∞the␈↓ α|
␈↓ α|␈βεZ␈↓␈↓ α|output␈α∀world␈α∪and␈α∪then␈α∪modifying␈α∪the␈α∪output␈α∪world␈α∪to␈α∪reflect␈α∪any␈α∪changes␈↓ α|
␈↓ α|␈βε⎇␈↓␈↓ α|introduced␈α⊃by␈α⊃the␈α⊃statement.␈α⊃STINTERP␈α⊃is␈α⊃capable␈α⊃of␈α⊂handling␈α⊂all␈α⊂the␈α⊂AL␈↓ α|
␈↓ α|␈βπ ␈↓␈↓ α|control␈α⊃structures␈α⊂currently␈α⊂implemented,␈α⊂including␈α⊂conditionals,␈α⊂coblocks,␈α⊂and␈↓ α|
␈↓ α|␈βπC␈↓␈↓ α|loops.␈αIn␈αaddition␈αto␈αbuilding␈αthe␈αplanning␈αmodel,␈α
STINTERP␈α
makes␈α
a␈α
number␈↓ α|
␈↓ α|␈βπf␈↓␈↓ α|of␈α∀minor␈α∀modifications␈α∀to␈α∀the␈α∀program␈α∀graph.␈α∀These␈α∪include␈α∪invention␈α∪of␈↓ α|
␈↓ α|␈βλ	␈↓␈↓ α|temporary␈α∪variables,␈α∪translation␈α∪of␈α∪AFFIX␈α∪and␈α∩UNFIX␈α∩statements␈α∩into␈α∩the␈↓ α|
␈↓ α|␈βλ,␈↓␈↓ α|corresponding␈α∞graph␈α∞modification␈α∞statements,␈α∞and␈α
rewriting␈α
MOVE␈α
statements␈↓ α|
␈↓ α|␈βλO␈↓␈↓ α|to␈α∂always␈α∂be␈α∞in␈α∞terms␈α∞of␈α∞an␈α∞arm.␈α∞Procedures␈α∞for␈α∞larger␈α∞modifications,␈α∞such␈α∞as␈↓ α|
␈↓ α|␈βλr␈↓␈↓ α|"unrolling"␈α→of␈α→loops␈α→or␈α→translation␈α→of␈α→"very␈α→high␈α→level"␈α→statements␈α→into␈↓ α|
␈↓ α|␈β	∃␈↓␈↓ α|manipulator␈αcommands,␈αare␈αnot␈αincluded␈αin␈αthe␈αversion␈α
presently␈α
integrated␈α
into␈↓ α|
␈↓ α|␈β	8␈↓␈↓ α|the␈α
compiler.␈↓ α|
␈↓ α,␈β	[␈↓␈↓ α,
␈↓ α,␈β	}␈↓␈↓ α,Once␈αpreprocessing␈αis␈αcomplete,␈αthe␈αplanning␈αmodel's␈αdata␈αbase␈αwill␈αcontain␈αthe␈αdata␈αneeded␈↓ α,
␈↓ α,␈β
!␈↓␈↓ α,by␈αthe␈αtrajectory␈αcalculator.␈αFor␈αour␈αtest␈αcase,␈αthe␈αdata␈αbase␈αwill␈αcontain␈αassertions␈αthat␈αlook␈↓ α,
␈↓ α,␈β
D␈↓␈↓ α,roughly␈α
like␈α
the␈α
following:␈↓ α,
␈↓ α|␈β
n␈↓␈↓β␈↓ α|
␈↓ α|␈β⊃␈↓β(AFFIXED,a,YARM,t,RIGIDLY) in W3,W4,W5␈↓ α|
␈↓ α|␈β4␈↓β(AFFIXED,YARM,a,(TINVRT t),RIGIDLY) in W3,W4,W5␈↓ α|
␈↓ α|␈βW␈↓β␈↓ β\...␈↓ α|
␈↓ α|␈βz␈↓β(COMPUTES_a,(TTMUL YARM t)) in W3,W4,W5␈↓ α|
␈↓ α|␈β≥␈↓β␈↓ β\...␈↓ α|
␈↓ α|␈β@␈↓β(VALUE_OF_a,FRAME(ROT(YHAT,180*DEG),VECTOR(0,0,2)) in W1,W2,W3␈↓ α|
␈↓ α|␈βc␈↓β(VALUE_OF_a,FRAME(ROT(YHAT,180*DEG),VECTOR(0,0,3)) in W4␈↓ α|
␈↓ α|␈β
ε␈↓β␈↓ β\...␈↓ α|
␈↓ α,␈β
"␈↓β␈↓␈↓ α,
␈↓ α,␈β
E␈↓␈↓ α,In␈α∂addition,␈α∂the␈α∂AFFIX␈α∂statement␈α∂will␈α∂have␈α∂been␈α∂annotated␈α∂to␈α∂indicate␈α∂that␈α∂it␈α∞should␈α∞be␈↓ α,
␈↓ α,␈β
h␈↓␈↓ α,compiled␈α
as:␈↓ α,
␈↓ α|␈β∞∩␈↓␈↓β␈↓ α|
␈↓ α|␈β∞5␈↓β(AS t (TTMUL (TINVRT YARM) a))␈↓ α|
␈↓ α|␈β∞X␈↓β(GAS a = (g001 CLC (TTMUL YARM t)))␈↓ α|
␈↓ α|␈β∞{␈↓β(GAS YARM = (g002 CLC (TTMUL a (TINVRT t))))␈↓ α|
␈↓ α,␈β∂↔␈↓β␈↓␈↓ α,
␈↓ D␈β↓␈↓α[7]
␈↓ α,␈β↓H␈↓The UNFIX will be annotated for expansion as ␈↓ α,
␈↓ α|␈β↓r␈↓␈↓β␈↓ α|
␈↓ α|␈βα∃␈↓β(GAS a ≠ g001)␈↓ α|
␈↓ α|␈βα8␈↓β(GAS YARM ≠ g002)␈↓ α|
␈↓ α,␈βαT␈↓β␈↓␈↓ α,
␈↓ α,␈βαw␈↓␈↓ α,and␈αthe␈αmove␈αstatements␈αwill␈αbe␈αrewritten␈αexplicitly␈αin␈αterms␈αof␈αthe␈αyellow␈αarm.␈α
For␈α
instance,␈↓ α,
␈↓ α,␈ββ~␈↓␈↓ α,(MO␈α
a␈α
b)␈α
in␈α
our␈α
example␈α
would␈α
be␈α
rewritten␈α
as␈α
(MO␈α
YARM␈α
(TTMUL␈α
b␈α
(TINVRT␈α
t))).␈↓ α,
␈↓ α,␈ββ=␈↓␈↓ α,
␈↓ α,␈ββ`␈↓␈↓&Code Emitter␈↓)βλ␈↓ α,
␈↓ α,␈β∧β␈↓␈↓ α,
␈↓ α,␈β∧&␈↓␈↓ α,There␈α⊃are␈α⊃three␈α⊂major␈α⊂components␈α⊂in␈α⊂the␈α⊂code␈α⊂emission␈α⊂phase:␈α⊂a␈α⊂code␈α⊂generator,␈α⊂which␈↓ α,
␈↓ α,␈β∧I␈↓␈↓ α,translates␈α~internal␈α→structures␈α→into␈α→the␈α→proper␈α→interpreter␈α→pseudo-code,␈α→the␈α→trajectory␈↓ α,
␈↓ α,␈β∧l␈↓␈↓ α,calculator,␈α
and␈α
a␈α
function␈α
that␈α
does␈α
the␈α
actual␈α
work␈α
of␈α
writing␈α
the␈α
output␈α
file.␈↓ α,
␈↓ α,␈β¬∂␈↓␈↓ α,
␈↓ α,␈β¬2␈↓␈↓↓␈↓&code generator␈↓)βλ␈↓ α,
␈↓ α,␈β¬U␈↓↓␈↓ α,
␈↓ α,␈β¬x␈↓↓␈↓␈↓ α,The␈αprincipal␈αroutine␈αis␈αTSCAN,␈αwhich␈αgenerates␈αcode␈αfor␈αthe␈αroot␈αof␈αthe␈αbound␈αparse␈αtree␈↓ α,
␈↓ α,␈βε≠␈↓␈↓ α,and␈αcalls␈αitself␈αrecursively␈αfor␈αthe␈αrest.␈αTSCAN␈α
is␈α
a␈α
large␈α
IF-THEN-ELSE-IF-THEN␈α
chain␈↓ α,
␈↓ α,␈βε>␈↓␈↓ α,which␈α∞determines␈α∞which␈α∞of␈α∞the␈α∞various␈α∞possible␈α∞structures␈α∞is␈α∞present.␈α
If␈α
it␈α
is␈α
some␈α
kind␈α
of␈↓ α,
␈↓ α,␈βεa␈↓␈↓ α,statement,␈α∪then␈α∪appropriate␈α∪pseudo-code␈α∪is␈α∪emitted.␈α∪The␈α∪preparation␈α∪of␈α∪this␈α∩code␈α∩may␈↓ α,
␈↓ α,␈βπ∧␈↓␈↓ α,require␈αthat␈αcode␈αfor␈αthe␈αevaluation␈αof␈αan␈αexpression.␈α
Such␈α
code␈α
is␈α
prepared␈α
in␈α
the␈α
recursive␈↓ α,
␈↓ α,␈βπ'␈↓␈↓ α,procedure␈αEMITEXPR,␈αwhich␈αperforms␈αtype-consistency␈αchecking␈α(but␈αnot␈αconstant␈α
folding,␈↓ α,
␈↓ α,␈βπJ␈↓␈↓ α,which␈α
could␈α
be␈α
done␈α
here).␈α
Code␈α
for␈α
boolean␈α
tests␈α
is␈α
prepared␈α
by␈α
EMITBOOL.␈↓ α,
␈↓ α,␈βπm␈↓␈↓ α,
␈↓ α,␈βλ⊂␈↓␈↓↓␈↓&trajectory calculator␈↓)βλ␈↓ α,
␈↓ α,␈βλ3␈↓↓␈↓ α,
␈↓ α,␈βλV␈↓↓␈↓␈↓ α,The␈αtrajectory␈αcalculator␈αturns␈αmotion␈αspecifications␈αinto␈αinterpretable␈αtables.␈αAt␈αthe␈α
moment␈↓ α,
␈↓ α,␈βλy␈↓␈↓ α,it␈α⊂allows␈α⊂any␈α⊂one␈α⊂mechanism,␈α⊂that␈α⊂is,␈α⊂one␈α∂arm␈α∂or␈α∂one␈α∂hand.␈α∂Future␈α∂work␈α∂will␈α∂allow␈α∂any␈↓ α,
␈↓ α,␈β	≤␈↓␈↓ α,combination␈α
of␈α
mechanisms.␈α
The␈α
tables␈α
are␈α
calculated␈α
by␈α
the␈α
following␈α
method:␈↓ α,
␈↓ α,␈β	?␈↓␈↓ α,
␈↓ α|␈β	b␈↓␈↓ α|A␈αthread␈αis␈αmade,␈αwith␈αa␈αnode␈αfor␈α
each␈α
place␈α
in␈α
the␈α
motion␈α
specification,␈α
that␈α
is,␈↓ α|
␈↓ α|␈β
¬␈↓␈↓ α|the␈α∞initial␈α
point,␈α
the␈α
departure,␈α
if␈α
any,␈α
the␈α
via␈α
points,␈α
the␈α
approach␈α
point,␈α
and␈↓ α|
␈↓ α|␈β
(␈↓␈↓ α|the␈α
destination.␈α
Arm␈α
or␈α
hand␈α
solutions␈α
are␈α
calculated␈α
for␈α
each␈α
node.␈αIt␈αmay␈αbe␈↓ α|
␈↓ α|␈β
K␈↓␈↓ α|that␈α⊂this␈α⊂serial␈α⊂calculation␈α⊂will␈α⊂lead␈α⊂to␈α⊂flips␈α⊂of␈α⊂the␈α⊂arm.␈α⊂If␈α⊂this␈α∂happens,␈α∂the␈↓ α|
␈↓ α|␈β
n␈↓␈↓ α|proper␈α∪order␈α∩is␈α∩outside-in.␈α∩This␈α∩is␈α∩because␈α∩the␈α∩ARMSOL␈α∩routine␈α∩uses␈α∩the␈↓ α|
␈↓ α|␈β⊃␈↓␈↓ α|previous␈α
solution␈α
to␈α
resolve␈α
ambiguities␈α
in␈α
joint␈α
4␈α
of␈α
the␈α
Scheinman␈α
arms.␈↓ α|
␈↓ α,␈β4␈↓␈↓ α,␈↓ α,
␈↓ α|␈βW␈↓␈↓ α|Any␈α⊃deproach␈α⊃points␈α⊂or␈α⊂calculated␈α⊂via␈α⊂points␈α⊂or␈α⊂calculated␈α⊂destinations␈α⊂must␈↓ α|
␈↓ α|␈βz␈↓␈↓ α|have␈αcode␈αemitted␈αto␈αmake␈αa␈αcell␈αfor␈αthem␈αin␈αthe␈αgraph␈αstructure.␈αThe␈αcell␈αfor␈αa␈↓ α|
␈↓ α|␈β≥␈↓␈↓ α|departure␈α∞is␈α∞marked␈α∞permanently␈α∞invalid.␈α∞Its␈α∞calculator␈α
uses␈α
the␈α
hand␈α
position␈↓ α|
␈↓ α|␈β@␈↓␈↓ α|itself,␈αnot␈αthe␈αplace␈αwhere␈αthe␈αarm␈αwas␈αto␈αbe␈αat␈αthe␈α
start␈α
of␈α
the␈α
motion.␈α
The␈α
cells␈↓ α|
␈↓ α|␈βc␈↓␈↓ α|for␈αthe␈αcalculated␈αvia␈αpoints␈αand␈αthe␈αapproach␈αpoint␈αare␈αin␈αthe␈αgraph␈αstructure␈↓ α|
␈↓ α|␈β
ε␈↓␈↓ α|in␈αthe␈αusual␈α
way.␈α
This␈α
code␈α
must␈α
be␈α
emmitted␈α
at␈α
the␈α
outermost␈α
practical␈α
point␈α
in␈↓ α|
␈↓ α|␈β
)␈↓␈↓ α|the␈αprogram:␈αIf␈αit␈αis␈αtoo␈αfar␈αin,␈αthen␈αit␈αgets␈αredone␈αtoo␈αoften,␈αand␈αif␈αit␈αis␈αtoo␈αfar␈↓ α|
␈↓ α|␈β
L␈↓␈↓ α|out,␈α∂it␈α∂might␈α∂cause␈α∂graph␈α∂structure␈α∞to␈α∞hang␈α∞around␈α∞associated␈α∞to␈α∞non-existent␈↓ α|
␈↓ α|␈β
o␈↓␈↓ α|nodes.␈α
In␈α
any␈α
case,␈α
it␈α
is␈α
necessary␈α
to␈α
put␈α
such␈α
code␈α
at␈α
a␈α
block␈α
entry,␈α
and␈α
to␈α
be␈↓ α|
␈↓ α|␈β∞∩␈↓␈↓ α|sure␈α∞to␈α
get␈α
rid␈α
of␈α
the␈α
resulting␈α
graph␈α
structure␈α
at␈α
block␈α
exit.␈α
The␈α
current␈α
code␈↓ α|
␈↓ α|␈β∞5␈↓␈↓ α|does␈α
not␈α
handle␈α
any␈α
of␈α
this.␈↓ α|
␈↓ α,␈β∞X␈↓␈↓ α,␈↓ α,
␈↓ α|␈β∞{␈↓␈↓ α|At␈αthis␈α
time,␈α
the␈α
fourth␈α
degree␈α
polynomials␈α
for␈α
deproach␈α
segments␈α
are␈α
calculated,␈↓ α|
␈↓ α|␈β∂≡␈↓␈↓ α|and␈α⊗any␈α⊗given␈α∃velocity␈α∃constraints␈α∃are␈α∃noted.␈α∃The␈α∃presence␈α∃of␈α∃a␈α∃velocity␈↓ α|
␈↓ C␈β↓␈↓α[8]
␈↓ α|␈β↓H␈↓␈↓ α|constraint␈α⊂implies␈α⊂that␈α⊂the␈α∂acceleration␈α∂is␈α∂constrained␈α∂to␈α∂zero.␈α∂If␈α∂the␈α∂user␈α∂has␈↓ α|
␈↓ α|␈β↓k␈↓␈↓ α|supplied␈αa␈αtime,␈αit␈αis␈αput␈αin␈αUTIME,␈αand␈αSTIME␈αis␈αcomputed␈αby␈αthe␈αsystem.␈αIf␈↓ α|
␈↓ α|␈βα∞␈↓␈↓ α|they␈αare␈αcompatible,␈αSTIME␈αis␈α
modified␈α
to␈α
the␈α
final␈α
decision␈α
on␈α
the␈α
time␈α
for␈α
the␈↓ α|
␈↓ α|␈βα1␈↓␈↓ α|segment.␈↓ α|
␈↓ α,␈βαT␈↓␈↓ α,␈↓ α,
␈↓ α|␈βαw␈↓␈↓ α|After␈αthe␈αentire␈αthread␈αis␈αmade,␈αa␈αglobal␈αcheck␈αis␈αmade␈αto␈α
insure␈α
that␈α
the␈α
timing␈↓ α|
␈↓ α|␈ββ~␈↓␈↓ α|is␈αin␈αagreement␈αwith␈αthe␈αuser's␈αwishes.␈αThen␈αthe␈αthread␈αis␈αdivided␈αinto␈αchunks,␈↓ α|
␈↓ α|␈ββ=␈↓␈↓ α|where␈α⊃each␈α⊂chunk␈α⊂is␈α⊂the␈α⊂region␈α⊂between␈α⊂two␈α⊂velocity-constrained␈α⊂points␈α⊂(the␈↓ α|
␈↓ α|␈ββ`␈↓␈↓ α|deproach␈α∩points␈α∩are␈α∩such).␈α∩A␈α∩chunk␈α∩which␈α∩has␈α∩only␈α∩two␈α∩points␈α⊃(but␈α⊃not␈α⊃a␈↓ α|
␈↓ α|␈β∧β␈↓␈↓ α|deproach␈α⊂chunk,␈α⊂for␈α⊂which␈α⊂the␈α⊂trajectory␈α⊂has␈α∂already␈α∂been␈α∂calculated)␈α∂gets␈α∂a␈↓ α|
␈↓ α|␈β∧&␈↓␈↓ α|fifth-degree␈α⊂polynomial␈α⊂calculated␈α∂to␈α∂match␈α∂all␈α∂the␈α∂constraints.␈α∂A␈α∂chunk␈α∂with␈↓ α|
␈↓ α|␈β∧I␈↓␈↓ α|more␈α∞points␈α∞requires␈α∞splining␈α∞for␈α∞the␈α∞trajectory.␈α∞The␈α∞first␈α∞step␈α∞is␈α
to␈α
insert␈α
one␈↓ α|
␈↓ α|␈β∧l␈↓␈↓ α|unconstrained␈αpoint␈αin␈αeach␈αof␈αthe␈αtwo␈αlongest␈αintervals.␈αIt␈αhas␈αbeen␈αfound␈αthat␈↓ α|
␈↓ α|␈β¬∂␈↓␈↓ α|the␈αbest␈αplace␈αfor␈αthese␈αpoints␈αis␈αalmost␈αat␈αthe␈αvery␈αend␈αof␈αthe␈αintervals␈α(.999␈αof␈↓ α|
␈↓ α|␈β¬2␈↓␈↓ α|the␈α≠way␈α~to␈α~the␈α~end)␈α~to␈α~minimise␈α~overshoot␈α~problems.␈α~After␈α~the␈α~fully␈↓ α|
␈↓ α|␈β¬U␈↓␈↓ α|unconstrained␈α∞nodes␈α∞have␈α∞been␈α∞inserted␈α∞into␈α∞the␈α∞thread,␈α∞the␈α∞routine␈α
POLY␈α
is␈↓ α|
␈↓ α|␈β¬x␈↓␈↓ α|called␈α∂to␈α∂create␈α∂the␈α∂coefficients␈α∂of␈α∂the␈α∂third␈α∂degree␈α∂splined␈α∂polynomial.␈α∂It␈α∞has␈↓ α|
␈↓ α|␈βε≠␈↓␈↓ α|been␈αfound␈αthat␈αusing␈αfourth␈αdegree␈αpolynomials␈αin␈αtwo␈αof␈αthe␈αsegments␈αinstead␈↓ α|
␈↓ α|␈βε>␈↓␈↓ α|of␈α
inserting␈α
two␈α
unconstrained␈αpoints␈αleads␈αto␈αuncontrollable␈αovershoot.␈αFinally,␈↓ α|
␈↓ α|␈βεa␈↓␈↓ α|the␈α
resulting␈α
trajectory␈α
is␈α
emitted.␈↓ α|
␈↓ α,␈βπ∧␈↓␈↓ α,␈↓ α,
␈↓ α,␈βπ'␈↓␈↓ α,The␈αfollowing␈αconventions␈αare␈αused␈αfor␈αarms␈αand␈αjoints.␈αJoints␈α1-6␈αare␈αyellow␈αarm␈α(arm␈α0),␈↓ α,
␈↓ α,␈βπJ␈↓␈↓ α,and␈αjoint␈α7␈αis␈αthe␈αyellow␈αfingers␈α(arm␈α2).␈αJoints␈α8-13␈αare␈αthe␈αblue␈αarm␈α(arm␈α1),␈αand␈αjoint␈α14␈↓ α,
␈↓ α,␈βπm␈↓␈↓ α,is␈αthe␈αblue␈αfingers␈α(arm␈α3).␈α
The␈α
angle␈α
arrays␈α
are␈α
tailored␈α
to␈α
have␈α
whatever␈α
joints␈α
are␈α
needed.␈↓ α,
␈↓ α,␈βλ⊂␈↓␈↓ α,The␈α
arm␈α
and␈α
hand␈α
solution␈α
programs␈α
are␈α
told␈α
which␈α
mechanism␈α
to␈α
expect.␈↓ α,
␈↓ α,␈βλ3␈↓␈↓ α,
␈↓ α,␈βλV␈↓␈↓ α,The␈αcurrent␈αcode␈αdoes␈αnot␈αcheck␈αlocation,␈αvelocity␈αor␈αacceleration␈αbounds␈αexcept␈αfor␈αlocation␈↓ α,
␈↓ α,␈βλy␈↓␈↓ α,bounds␈αat␈αuser-specified␈αplaces.␈αInstead,␈αlocation␈αbounds␈αare␈αto␈αa␈αlarge␈αextent␈α
insured␈α
by␈α
the␈↓ α,
␈↓ α,␈β	≤␈↓␈↓ α,servo.␈α∞Velocity␈α∞and␈α∞acceleration␈α∞can␈α∞be␈α∞optimized␈α∞by␈α∞rescaling␈α∞time,␈α
in␈α
the␈α
cases␈α
when␈α
the␈↓ α,
␈↓ α,␈β	?␈↓␈↓ α,user␈α⊃has␈α⊃not␈α⊃specified␈α⊃any␈α⊃time␈α⊃in␈α⊂the␈α⊂entire␈α⊂motion,␈α⊂nor␈α⊂any␈α⊂velocities,␈α⊂but␈α⊂this␈α⊂is␈α⊂not␈↓ α,
␈↓ α,␈β	b␈↓␈↓ α,currently␈α
attempted.␈↓ α,
␈↓ α,␈β
¬␈↓␈↓ α,
␈↓ α,␈β
(␈↓␈↓↓␈↓&output function␈↓)βλ␈↓ α,
␈↓ α,␈β
K␈↓↓␈↓ α,
␈↓ α,␈β
n␈↓↓␈↓␈↓ α,All␈αcode␈αemission␈αis␈αdone␈αthrough␈αthe␈αroutine␈αEMIT␈αwhich␈α
takes␈α
arguments␈α
specifying␈α
what␈↓ α,
␈↓ α,␈β⊃␈↓␈↓ α,output␈α∂file␈α∂to␈α∂use␈α∂(e.g.,␈α∂pseudo-code␈α∞or␈α∞constant␈α∞area),␈α∞the␈α∞data␈α∞to␈α∞output,␈α∞and␈α∞whether␈α∞to␈↓ α,
␈↓ α,␈β4␈↓␈↓ α,treat␈α
it␈α
as␈αan␈αinstruction,␈αan␈αoctal␈αconstant,␈αa␈αlabel␈αdeclaration,␈αor␈αrepeatedly␈αto␈αproduce␈αthe␈↓ α,
␈↓ α,␈βW␈↓␈↓ α,rel␈α
file.␈↓ α,
␈↓ α,␈βz␈↓␈↓ α,
␈↓ α,␈β≥␈↓␈↓ α,At␈α∞present,␈α
output␈α
is␈α
generated␈α
as␈α
text,␈α
in␈α
the␈α
form␈α
of␈α
symbolic␈α
operation␈α
codes␈α
and␈α
literal␈↓ α,
␈↓ α,␈β@␈↓␈↓ α,numbers.␈α∂This␈α∂text␈α∂is␈α∂then␈α∂run␈α∞through␈α∞a␈α∞standard␈α∞PDP-11␈α∞assembler␈α∞to␈α∞produce␈α∞binary␈↓ α,
␈↓ α,␈βc␈↓␈↓ α,load␈α
modules.␈↓ α,
␈↓ α,␈β
ε␈↓␈↓ α,
␈↓ D␈β↓␈↓α[9]